import Vue from 'vue'
import Vuex from 'vuex'

// 导入模块
import userModules from './modules/user'
import cartMoudles from './modules/cart'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    'm_user': userModules,
    'm_cart': cartMoudles
  },
  getters: {
    token(state) {
      return state.m_user.userInfo.token
     }
  },
})
